package com.xzr;


import java.util.Arrays;

/**
 * @Author：jojo
 * @Date：2022/1/20 13:15
 * @Description :TODO
 */
public class Test {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5,6,7,8,9,10};
        int[] ints = Arrays.copyOf(arr, arr.length + 1);
        //从下标为5的位置插入一个数55
        System.arraycopy(ints,5,ints,6,5);
        ints[5] = 55;
        for (int i : ints) {
            System.out.print(i+",");
        }
    }
}
